import { postBindPhone } from './services';

export default {
  namespace: 'bindPhone',
  effects: {
    *setBindPhone({ payload }, { call, put }) {
      const response = yield call(postBindPhone, payload);
      const { code, msg } = response;
      if (code === 1) {
        return Promise.resolve(msg);
      }
      return Promise.reject(msg);
    },
  },
  reducers: {},
};
